<?php
include "konek.php";
$a =1;
$ada =$_GET['cb'];

$ql_prod =mysql_query("SELECT a.*,b.product,count(*) as PROD from (ticket a,product b) where a.prod_id = b.prod_id and product like '%$ada%' and severity_level in('Medium','Low','High') group by(severity_level) ");
/*$a_prods = mysql_fetch_object($ql_prod);
$x =$a_prods->product;*/
echo "

<graph caption='$ada' xAxisName='$X' showNames='1'  decimalPrecision='0'  >";
 while($a_prod = mysql_fetch_array($ql_prod)) {
 $A =$a_prod['severity_level'];
 $B =$a_prod['PROD'];
 $X =$a_prod['product'];
 echo "
	<set name='$A' value='$B'  />
    ";
}
echo "</graph>";



?>